<?php

namespace app\controller;

use app\BaseController;
use think\response\Json;

class Test extends BaseController
{
    public function test($value = 'sys'): string
    {
        return 'test' . $value;
    }

    public function test1(): Json
    {
        $data = array('a' => 1, 'b' => 3, 'd' => 5, 'lk' => 'dd');
        return json($data);
    }

    public function test2(): float
    {
        /*
        var_dump('ss');;
        echo '333';
        halt();
        echo '33ds';
        */
        $a = 33;
        $b = 33.3333;
        return $a + $b;
    }

    public function index(): string
    {
        // return $this->app->getBasePath();
        return $this->request->action();
    }
}